package com.ljy.my_study.rpc传输对象.rpc;

import java.io.IOException;
import java.io.ObjectOutputStream;
import java.net.Socket;

import com.ljy.my_study.rpc传输对象.domain.Student;

/** 
* @author James
* @date 2018年6月5日 
*/
public class SocketClient {
	public static void main(String[] args) {
		try {
			Socket socket=new Socket("127.0.0.1",9999);
			ObjectOutputStream out=new ObjectOutputStream(socket.getOutputStream());
			Student s=new Student();
			s.setName("james");
			s.setAge(25);
			s.setGrade(100);
			s.setStature(172);
			out.writeObject(s);
			out.close();
			socket.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
